package cn.net.msg.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import cn.net.msg.dao.TbNewsDao;
import cn.net.msg.model.TbFavourite;
import cn.net.msg.model.TbNewslistUrl;

@Component("tbNewsService")
public class TbNewsService {

    @Resource(name = "tbNewsDao")
    private TbNewsDao dao;

    @Transactional
    public TbNewslistUrl getNewsListUrl(int newstype, int currentpage){
        return dao.getNewsListUrl(newstype, currentpage);
    }

    @Transactional
    public boolean checkIsExistFavouriteRecord(TbFavourite tbFavourite){
        return dao.checkIsExistFavouriteRecord(tbFavourite);
    }

    @Transactional
    public void addFavouriteNews(TbFavourite tbFavourite){
        dao.addFavouriteNews(tbFavourite);
    }
}
